<?php
class Stock extends AppModel {
	public $belongsTo = "Product";
	public $validate = array(
        'quantite' => array(
            'required' => array(
                'rule' => array('notEmpty'),
                'message' => 'La quantite est requise'
            ),
            'comparison' => array(
            	'rule' => array('comparison', '>=', 0),
            	'message' => 'La quantite doit etre superieur ou egal a 0'
            )
        )
    );
}